package com.woniuxy.light_smart.mapper;

import com.woniuxy.light_smart.dto.LoginDto;



import com.woniuxy.light_smart.dto.UpdatePwdDto;

import com.woniuxy.light_smart.dto.UserDto;

import com.woniuxy.light_smart.entity.User;
import com.woniuxy.light_smart.vo.UserVo;

import java.util.List;

import java.util.List;

/**
* @author asus
* @description 针对表【user】的数据库操作Mapper
* @createDate 2022-12-05 20:06:10
* @Entity com.woniuxy.light_smart.entity.User
*/
public interface UserMapper {
    List<User> selectAll();
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByTelAndPsw(LoginDto loginDto);

    /**
     * 根据电话或邮箱获取对象
     * @param tel
     * @return
     */
    User selectByTelOrMail(String tel);

    /**
     * 根据邮箱查用户
     * @param mail
     * @return
     */
    User selectByMail(String mail);
    /**
     * 查询所有用户
     */
    List<UserVo> selectAllUserByLike(UserDto userDto);

    /**
     * 更改密码
     * @param updatePwdDto
     * @return
     */
    int updatePwd(UpdatePwdDto updatePwdDto);
     /** 添加用户
     * @param userDto
     * @return
     */
    int insertUser(UserDto userDto);

    /**根据uid查找用户
     * 根据uidxu
     * @param id
     * @return
     */
    UserVo selectByUid(Long id);

    /**
     * 修改用户
     *
     */
    int updateUser(UserDto userDto);
}
